#[doc = "Register `UART_MIS` reader"]
pub struct R(crate::R<UART_MIS_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<UART_MIS_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<UART_MIS_SPEC>> for R {
    fn from(reader: crate::R<UART_MIS_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Masked overflow error interrupt state.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum OEMIS_A {
    #[doc = "0: No interrupt is generated."]
    NO_INTERRUPT = 0,
    #[doc = "1: An interrupt is generated."]
    HAS_INTERRUPT = 1,
}
impl From<OEMIS_A> for bool {
    #[inline(always)]
    fn from(variant: OEMIS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `oemis` reader - Masked overflow error interrupt state."]
pub struct OEMIS_R(crate::FieldReader<bool, OEMIS_A>);
impl OEMIS_R {
    pub(crate) fn new(bits: bool) -> Self {
        OEMIS_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> OEMIS_A {
        match self.bits {
            false => OEMIS_A::NO_INTERRUPT,
            true => OEMIS_A::HAS_INTERRUPT,
        }
    }
    #[doc = "Checks if the value of the field is `NO_INTERRUPT`"]
    #[inline(always)]
    pub fn is_no_interrupt(&self) -> bool {
        **self == OEMIS_A::NO_INTERRUPT
    }
    #[doc = "Checks if the value of the field is `HAS_INTERRUPT`"]
    #[inline(always)]
    pub fn is_has_interrupt(&self) -> bool {
        **self == OEMIS_A::HAS_INTERRUPT
    }
}
impl core::ops::Deref for OEMIS_R {
    type Target = crate::FieldReader<bool, OEMIS_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Masked break error interrupt state.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum BEMIS_A {
    #[doc = "0: No interrupt is generated."]
    NO_INTERRUPT = 0,
    #[doc = "1: An interrupt is generated."]
    HAS_INTERRUPT = 1,
}
impl From<BEMIS_A> for bool {
    #[inline(always)]
    fn from(variant: BEMIS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `bemis` reader - Masked break error interrupt state."]
pub struct BEMIS_R(crate::FieldReader<bool, BEMIS_A>);
impl BEMIS_R {
    pub(crate) fn new(bits: bool) -> Self {
        BEMIS_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> BEMIS_A {
        match self.bits {
            false => BEMIS_A::NO_INTERRUPT,
            true => BEMIS_A::HAS_INTERRUPT,
        }
    }
    #[doc = "Checks if the value of the field is `NO_INTERRUPT`"]
    #[inline(always)]
    pub fn is_no_interrupt(&self) -> bool {
        **self == BEMIS_A::NO_INTERRUPT
    }
    #[doc = "Checks if the value of the field is `HAS_INTERRUPT`"]
    #[inline(always)]
    pub fn is_has_interrupt(&self) -> bool {
        **self == BEMIS_A::HAS_INTERRUPT
    }
}
impl core::ops::Deref for BEMIS_R {
    type Target = crate::FieldReader<bool, BEMIS_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Masked parity interrupt state.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PEMIS_A {
    #[doc = "0: No interrupt is generated."]
    NO_INTERRUPT = 0,
    #[doc = "1: An interrupt is generated."]
    HAS_INTERRUPT = 1,
}
impl From<PEMIS_A> for bool {
    #[inline(always)]
    fn from(variant: PEMIS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `pemis` reader - Masked parity interrupt state."]
pub struct PEMIS_R(crate::FieldReader<bool, PEMIS_A>);
impl PEMIS_R {
    pub(crate) fn new(bits: bool) -> Self {
        PEMIS_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> PEMIS_A {
        match self.bits {
            false => PEMIS_A::NO_INTERRUPT,
            true => PEMIS_A::HAS_INTERRUPT,
        }
    }
    #[doc = "Checks if the value of the field is `NO_INTERRUPT`"]
    #[inline(always)]
    pub fn is_no_interrupt(&self) -> bool {
        **self == PEMIS_A::NO_INTERRUPT
    }
    #[doc = "Checks if the value of the field is `HAS_INTERRUPT`"]
    #[inline(always)]
    pub fn is_has_interrupt(&self) -> bool {
        **self == PEMIS_A::HAS_INTERRUPT
    }
}
impl core::ops::Deref for PEMIS_R {
    type Target = crate::FieldReader<bool, PEMIS_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Masked error interrupt state.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum FEMIS_A {
    #[doc = "0: No interrupt is generated."]
    NO_INTERRUPT = 0,
    #[doc = "1: An interrupt is generated."]
    HAS_INTERRUPT = 1,
}
impl From<FEMIS_A> for bool {
    #[inline(always)]
    fn from(variant: FEMIS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `femis` reader - Masked error interrupt state."]
pub struct FEMIS_R(crate::FieldReader<bool, FEMIS_A>);
impl FEMIS_R {
    pub(crate) fn new(bits: bool) -> Self {
        FEMIS_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> FEMIS_A {
        match self.bits {
            false => FEMIS_A::NO_INTERRUPT,
            true => FEMIS_A::HAS_INTERRUPT,
        }
    }
    #[doc = "Checks if the value of the field is `NO_INTERRUPT`"]
    #[inline(always)]
    pub fn is_no_interrupt(&self) -> bool {
        **self == FEMIS_A::NO_INTERRUPT
    }
    #[doc = "Checks if the value of the field is `HAS_INTERRUPT`"]
    #[inline(always)]
    pub fn is_has_interrupt(&self) -> bool {
        **self == FEMIS_A::HAS_INTERRUPT
    }
}
impl core::ops::Deref for FEMIS_R {
    type Target = crate::FieldReader<bool, FEMIS_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Masked RX timeout interrupt state.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RTMIS_A {
    #[doc = "0: No interrupt is generated."]
    NO_INTERRUPT = 0,
    #[doc = "1: An interrupt is generated."]
    HAS_INTERRUPT = 1,
}
impl From<RTMIS_A> for bool {
    #[inline(always)]
    fn from(variant: RTMIS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `rtmis` reader - Masked RX timeout interrupt state."]
pub struct RTMIS_R(crate::FieldReader<bool, RTMIS_A>);
impl RTMIS_R {
    pub(crate) fn new(bits: bool) -> Self {
        RTMIS_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> RTMIS_A {
        match self.bits {
            false => RTMIS_A::NO_INTERRUPT,
            true => RTMIS_A::HAS_INTERRUPT,
        }
    }
    #[doc = "Checks if the value of the field is `NO_INTERRUPT`"]
    #[inline(always)]
    pub fn is_no_interrupt(&self) -> bool {
        **self == RTMIS_A::NO_INTERRUPT
    }
    #[doc = "Checks if the value of the field is `HAS_INTERRUPT`"]
    #[inline(always)]
    pub fn is_has_interrupt(&self) -> bool {
        **self == RTMIS_A::HAS_INTERRUPT
    }
}
impl core::ops::Deref for RTMIS_R {
    type Target = crate::FieldReader<bool, RTMIS_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Masked TX interrupt state.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXMIS_A {
    #[doc = "0: No interrupt is generated."]
    NO_INTERRUPT = 0,
    #[doc = "1: An interrupt is generated."]
    HAS_INTERRUPT = 1,
}
impl From<TXMIS_A> for bool {
    #[inline(always)]
    fn from(variant: TXMIS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `txmis` reader - Masked TX interrupt state."]
pub struct TXMIS_R(crate::FieldReader<bool, TXMIS_A>);
impl TXMIS_R {
    pub(crate) fn new(bits: bool) -> Self {
        TXMIS_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TXMIS_A {
        match self.bits {
            false => TXMIS_A::NO_INTERRUPT,
            true => TXMIS_A::HAS_INTERRUPT,
        }
    }
    #[doc = "Checks if the value of the field is `NO_INTERRUPT`"]
    #[inline(always)]
    pub fn is_no_interrupt(&self) -> bool {
        **self == TXMIS_A::NO_INTERRUPT
    }
    #[doc = "Checks if the value of the field is `HAS_INTERRUPT`"]
    #[inline(always)]
    pub fn is_has_interrupt(&self) -> bool {
        **self == TXMIS_A::HAS_INTERRUPT
    }
}
impl core::ops::Deref for TXMIS_R {
    type Target = crate::FieldReader<bool, TXMIS_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Masked RX interrupt state.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXMIS_A {
    #[doc = "0: No interrupt is generated."]
    NO_INTERRUPT = 0,
    #[doc = "1: An interrupt is generated."]
    HAS_INTERRUPT = 1,
}
impl From<RXMIS_A> for bool {
    #[inline(always)]
    fn from(variant: RXMIS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `rxmis` reader - Masked RX interrupt state."]
pub struct RXMIS_R(crate::FieldReader<bool, RXMIS_A>);
impl RXMIS_R {
    pub(crate) fn new(bits: bool) -> Self {
        RXMIS_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> RXMIS_A {
        match self.bits {
            false => RXMIS_A::NO_INTERRUPT,
            true => RXMIS_A::HAS_INTERRUPT,
        }
    }
    #[doc = "Checks if the value of the field is `NO_INTERRUPT`"]
    #[inline(always)]
    pub fn is_no_interrupt(&self) -> bool {
        **self == RXMIS_A::NO_INTERRUPT
    }
    #[doc = "Checks if the value of the field is `HAS_INTERRUPT`"]
    #[inline(always)]
    pub fn is_has_interrupt(&self) -> bool {
        **self == RXMIS_A::HAS_INTERRUPT
    }
}
impl core::ops::Deref for RXMIS_R {
    type Target = crate::FieldReader<bool, RXMIS_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl R {
    #[doc = "Bit 10 - Masked overflow error interrupt state."]
    #[inline(always)]
    pub fn oemis(&self) -> OEMIS_R {
        OEMIS_R::new(((self.bits >> 10) & 0x01) != 0)
    }
    #[doc = "Bit 9 - Masked break error interrupt state."]
    #[inline(always)]
    pub fn bemis(&self) -> BEMIS_R {
        BEMIS_R::new(((self.bits >> 9) & 0x01) != 0)
    }
    #[doc = "Bit 8 - Masked parity interrupt state."]
    #[inline(always)]
    pub fn pemis(&self) -> PEMIS_R {
        PEMIS_R::new(((self.bits >> 8) & 0x01) != 0)
    }
    #[doc = "Bit 7 - Masked error interrupt state."]
    #[inline(always)]
    pub fn femis(&self) -> FEMIS_R {
        FEMIS_R::new(((self.bits >> 7) & 0x01) != 0)
    }
    #[doc = "Bit 6 - Masked RX timeout interrupt state."]
    #[inline(always)]
    pub fn rtmis(&self) -> RTMIS_R {
        RTMIS_R::new(((self.bits >> 6) & 0x01) != 0)
    }
    #[doc = "Bit 5 - Masked TX interrupt state."]
    #[inline(always)]
    pub fn txmis(&self) -> TXMIS_R {
        TXMIS_R::new(((self.bits >> 5) & 0x01) != 0)
    }
    #[doc = "Bit 4 - Masked RX interrupt state."]
    #[inline(always)]
    pub fn rxmis(&self) -> RXMIS_R {
        RXMIS_R::new(((self.bits >> 4) & 0x01) != 0)
    }
}
#[doc = "UART_MIS is the masked interrupt status register.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [uart_mis](index.html) module"]
pub struct UART_MIS_SPEC;
impl crate::RegisterSpec for UART_MIS_SPEC {
    type Ux = u16;
}
#[doc = "`read()` method returns [uart_mis::R](R) reader structure"]
impl crate::Readable for UART_MIS_SPEC {
    type Reader = R;
}
#[doc = "`reset()` method sets UART_MIS to value 0"]
impl crate::Resettable for UART_MIS_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}
